#pragma once
#include "Light.h"

namespace MASGK
{
	struct Attenuation
	{
		float	constant;
		float	linear;
		float	exponent;

		Attenuation()
		{

		}

		Attenuation(float _const, float _lin, float _exp)
		{
			constant = _const;
			linear = _lin;
			exponent = _exp;
		}
	};

	class CPointLight : public CLight
	{
		private:
			Attenuation				m_Attenuation;
			float					m_Range;

		public:
			CPointLight() { m_Attenuation = Attenuation(0.0f, 0.0f, 1.0f); m_Range = 2.0f; }
			CPointLight(float3 _pos, float3 _col, float _int, Attenuation _att, float _rng): CLight(_pos, _col, _int), m_Attenuation(_att), m_Range(_rng) {}
			~CPointLight() {}

			float3 PointLightEquation(float3);
			float3 Phong(float3, float3, float3, int);
	};
}